module(..., package.seeall)
require "myUiWin"

PAGEID = 0
local backColor = 0x0000
local antiColor = 0xFFFF -- 选中反显色
local ver = ""

function initPage()
    disp.setcolor(0xFFFF)
    disp.setbkcolor(backColor)
    disp.clear()

    disp.putimage("/lua/logo4.png", 20, 10)
    disp.puttext(common.utf8ToGb2312("升级中"),
                 ui_handle.getXPos(common.utf8ToGb2312("升级中")), 60)
    disp.puttext(ver, ui_handle.getXPos(ver), 90)
    disp.update()
end

function refresh() initPage() end

function onKey() end

local function open_ui(version) 
    local res =tool.Split(version,"_")
    ver = res[4]
    
    myUiWin.openWin(ui_upgrade.PAGEID)
end

sys.subscribe("UPGRADE", open_ui)

